﻿using System;

namespace Teigha.Core
{
	public class OdRxIterator_Internal : OdRxIterator
	{
		public OdRxIterator_Internal(IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
		{
		}

		public override bool done()
		{
			bool result = GlobalsPINVOKE.OdRxIterator_done(OdRxIterator.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override bool next()
		{
			bool result = GlobalsPINVOKE.OdRxIterator_next(OdRxIterator.getCPtr(this));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public override OdRxObject getObject()
		{
			IntPtr cPtr = GlobalsPINVOKE.OdRxIterator_getObject(OdRxIterator.getCPtr(this));
			OdRxObject result = new OdRxObject(cPtr, false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}
	}
}
